%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%  Filename:           liacs-poster.sty
%%  Author:             
%%  Last Revision:               June 1997
%%
%%  Description:        LaTeX2e style file for the LIACS institute
%%                      A0 academic posters.
%%
%%  Version:            0.1 alpha
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% This is a style file for A0 academic posters. To be used in
% conjunction with the a0poster document class. Also requires pstricks
% and multicol packages amongst others.
%
% Only Portrait mode is currently supported.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Package options
%
% nologos      - no logos at the top
% sponsorlogo  - include a arbitrary sponsor logo (along with any others)
%                You must then define \sponsorlogo and \sponsorlogoscale
%
% You get an eduni logo in the top right.
% To override a logo redefine \leftlogo \leftlogoscale  or
%                             \rightlogo \rightlogoscale
% 
%
% cstr logo is square, hcrc logo is long and thin, if you want to
% include your own logo in the top left, choose the most apropriate
% shape match and redefine \leftlogo and \leftlogoscale
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Required preamble definitions are (define empty to omit): 
%
% \title{}
% \author{}, \affiliation{}, \email{}               % Placed in centre of title
% \authorleft{}, \affiliationleft{}, \emailleft{}   % Placed in left of title
% \authorright{}, \affiliationright{}, \emailright{}% Placed in right of title
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Option defines are: (to change use: \def\option_name{option_value}
%
% Colour options: (I'm using color to be consistent with the color package)
% \bordercolor  - the outer border
% \colsepcolor  - rule colour between columns 
%                 (use \colseprule=0mm to have no rule)
% \secheadcol   - Section heading colour
% \authorcol    - Author block colour
%
% Logo options (See above)
% \leftlogo, \rightlogo, \sponsorlogo
% \leftlogoscale, \rightlogoscale, \sponsorlogoscale


\NeedsTeXFormat{LaTeX2e}[1995/12/01] \ProvidesPackage{liacs-poster}
[1997/08/14 v0.1a Ed a0 Poster style]
% We use rather a lot here.
\RequirePackage{ifthen,array,multicol,fancyheadings,setspace}
\RequirePackage{colordvi}
\RequirePackage[usenames]{pstcol}
\RequirePackage{graphicx}
\RequirePackage{palatino}

\newif\if@toplogos
\newif\if@bottomlogo
\newif\if@leftlogo
\newif\if@sponsorlogo
\newif\if@hcrc
\newif\if@esrc
\@toplogostrue
\@hcrcfalse
\@esrcfalse
\@leftlogofalse
\@sponsorlogofalse


\DeclareOption{nologos}{\@toplogosfalse}
\DeclareOption{sponsorlogo}{\@sponsorlogotrue\@bottomlogotrue}

\ProcessOptions

% Definitions
\newcommand{\Mega}{\fontsize{120}{140}\selectfont}

\pagestyle{fancyplain}
\cfoot{}
\rfoot{%
%\if@esrc
%  \scalebox{2}{\includegraphics{esrc.eps}}\hspace{1cm}%
%\fi
\if@sponsorlogo
  \scalebox{\sponsorlogoscale}{\includegraphics{\sponsorlogo}}\hspace{1cm}%
\fi
\hspace{4cm}}

% eduni logo in right hand corner
%\def\rightlogo{liacs-logo.eps}
\def\rightlogo{logo.pdf}
\def\rightlogoscale{4}

\def\affiliation#1{\gdef\@affiliation{#1}}
\def\email#1{\gdef\@email{#1}}

\def\authorone#1{\gdef\@authorone{#1}}
\def\emailone#1{\gdef\@emailone{#1}}

\def\authortwo#1{\gdef\@authortwo{#1}}
\def\emailtwo#1{\gdef\@emailtwo{#1}}

%\def\authorthree#1{\gdef\@authorthree{#1}}
%\def\emailthree#1{\gdef\@emailthree{#1}}


\def\colsepcolor{edlogored}
\def\bordercolor{edlogored}
\def\secheadcol{edblue}
\def\authorcol{edblue}


\columnsep=3cm
\columnseprule=2mm
\setlength{\oddsidemargin}{1 cm}
\setlength{\textwidth}{77.56cm}

\if@bottomlogo
\setlength{\textheight}{106.5cm} % was 110.5
\else
\setlength{\textheight}{110.5cm} % was 110.5
\fi

\definecolor{edlogoblue}{rgb}{0,.627,1}
\definecolor{edblue}{rgb}{0.131,0.129,0.259}
\definecolor{edlogored}{rgb}{1,0,.360}
\definecolor{esrcblue}{rgb}{0,0,0.2}
\definecolor{entropicgreen}{rgb}{0.0,0.8,0.4}
\definecolor{entropicblue}{rgb}{0.0,0.5,0.7}
\definecolor{entropicpurple}{rgb}{0.8,0.0,1.0}


\def\@maketitle{%
\if@bottomlogo
\begin{pspicture}(78,105) % removed [1]
\psframe[linewidth=2mm,linecolor=\bordercolor,framearc=0.1](-1.5,-7.2)(78,104.6)
\end{pspicture}
\vspace{-103.5cm}
\else
\begin{pspicture}(78,108) % removed [1]
\psframe[linewidth=2mm,linecolor=\bordercolor,framearc=0.1](-1.5,-4.7)(78,107.6)
\end{pspicture}
\vspace{-103.5cm}
\fi
\begin{center}
\let \footnote \thanks
\if@toplogos
  \if@leftlogo
    \if@hcrc
      \begin{tabular}{p{12cm}m{1.5cm}>{\baselineskip=85pt\vskip -200pt}p{38cm}m{1.5cm}m{10cm}}
    \else
      \begin{tabular}{m{12cm}p{1.5cm}>{\baselineskip=85pt\vskip -200pt}p{38cm}p{1.5cm}m{10cm}}
    \fi
    \\ 
    \mbox{\scalebox{\leftlogoscale}{\includegraphics{\leftlogo}}} & &
    \centering {\VeryHuge \bfseries \@title}
    & &
    \mbox{\scalebox{\rightlogoscale}{\includegraphics{\rightlogo}}} \\
    \\
    \end{tabular}
  \else
    \begin{tabular}{m{0.5cm}>{\baselineskip=85pt\vskip -200pt}p{56cm}m{0.001cm}m{17cm}}
    \\ 
    & \begin{minipage}[c]{56cm}
      \centering {
      {\begin{spacing}{1.005}\VeryHuge \bfseries \@title\end{spacing}}
      \par
      %\vspace{0.5cm}
      {\huge \bfseries \color{\authorcol}
      \begin{tabular}{*{3}{>{\centering}m{18cm}}}
      \@authorone & \@authortwo %& \@authorthree
      \end{tabular}
      } \par
      {\LARGE \itshape \color{\authorcol}
      \begin{tabular}{*{3}{>{\centering}p{18cm}}}
      \@emailone & \@emailtwo %& \@emailthree
      \end{tabular}
      }
      {\LARGE \color{\authorcol}
      \begin{tabular}{*{1}{>{\centering}p{50cm}}} % changed to 50cm
      \@affiliation
      \end{tabular}
      } \par
      }
      \end{minipage}
    & &
    \mbox{\scalebox{\rightlogoscale}{\includegraphics{\rightlogo}}} \\
    \\
    \end{tabular}
  \fi
\else
% no logos
   \begin{tabular}{m{3cm}>{\baselineskip=85pt}p{65cm}m{3cm}}
   \\ 
   & \centering {\VeryHuge \bfseries \@title}
   & \\
   \\
   \end{tabular}
\fi

\end{center}
\vspace{1.5cm}
} %end maketitle

\def\section{\@startsection {section}{1}{\z@}%
                                   {-3.5ex \@plus -1ex \@minus -.2ex}%
                                   {2.3ex \@plus.2ex}%
                                   {\normalfont\LARGE\bfseries\color{\secheadcol}}}

\def\subsection{\@startsection{subsection}{2}{\z@}%
                                     {-3.25ex\@plus -1ex \@minus -.2ex}%
                                     {1.5ex \@plus .2ex}%
                                     {\normalfont\large\bfseries\color{\secheadcol}}}



\def\page@sofar{%
   \process@cols\mult@rightbox
       {\ifvoid\count@
          \setbox\count@\hbox to\hsize{}%
        \else
          \wd\count@\hsize
        \fi}%
   \mult@info\z@
    {Column spec:\MessageBreak
       (\the\multicol@leftmargin\space -->
        \the\full@width\space = \the\hsize
        \space x \the\col@number)%
     }%
\ifvmode\else\errmessage{Multicol Error}\fi
   \moveright\multicol@leftmargin
    \hbox to\full@width{%
     \process@cols\mult@gfirstbox{\box\count@
       \hss{\color{\colsepcolor}\vrule\@width\columnseprule}\hss}%
     \box\mult@rightbox
      \rlap{\phantom p}%
}}%
